package cn.itsource.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @program fccar_240420
 * @Description
 * @Date 2024/09/04 11:13
 * @Version 1.0
 */
@Data
@Component //交给spring管理
@ConfigurationProperties(prefix = "wechat")//加载配置文件
public class WechatConfig {
    private String appid;
    private String secret;
    public static String WECHAT_URL =
            "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";

    public static String ACCESS_TOKEN_URL =
            "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";

    public static String GET_USER_PHONE_URL =
            "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=%s";
}
